import request from '@/utils/request'

// 查询题目答案列表
export function listQuestionAnswer(query) {
  return request({
    url: '/exam/questionAnswer/list',
    method: 'get',
    params: query
  })
}

// 查询题目答案所有列表
export function listAllQuestionAnswer(query) {
  return request({
    url: '/exam/questionAnswer/listAll',
    method: 'get',
    params: query
  })
}

// 查询题目答案详细
export function getQuestionAnswer(answerId) {
  return request({
    url: '/exam/questionAnswer/getInfo/' + answerId,
    method: 'get'
  })
}

// 新增题目答案
export function addQuestionAnswer(data) {
  return request({
    url: '/exam/questionAnswer/add',
    method: 'post',
    data: data
  })
}

// 修改题目答案
export function updateQuestionAnswer(data) {
  return request({
    url: '/exam/questionAnswer/edit',
    method: 'post',
    data: data
  })
}

// 删除题目答案
export function delQuestionAnswer(answerId) {
  return request({
    url: '/exam/questionAnswer/remove/' + answerId,
    method: 'get'
  })
}
